module.exports = {
    '/index.php?editor/fileGet': {
        target: 'http://127.0.0.1:8080',
        changeOrigin: true,
    },
    '/index.php?editor/fileSave': {
        target: 'http://127.0.0.1:8080',
        changeOrigin: true,
    },
    '/index.php?explorer/treeList': {
        target: 'http://127.0.0.1:8080',
        changeOrigin: true,
    },
    '/index.php?explorer/mkfile': {
        target: 'http://127.0.0.1:8080',
        changeOrigin: true,
    },
    '/index.php?explorer/mkdir': {
        target: 'http://127.0.0.1:8080',
        changeOrigin: true,
    },
    '/index.php?explorer/pathDelete': {
        target: 'http://127.0.0.1:8080',
        changeOrigin: true,
    },
    '/index.php?explorer/pathInfo': {
        target: 'http://127.0.0.1:8080',
        changeOrigin: true,
    },
    '/index.php?explorer/pathList': {
        target: 'http://127.0.0.1:8080',
        changeOrigin: true,
    },
    '/index.php?fav/add': {
        target: 'http://127.0.0.1:8080',
        changeOrigin: true,
    },
    '/index.php?fav/del': {
        target: 'http://127.0.0.1:8080',
        changeOrigin: true,
    },

    '/index.php?explorer': {
        target: 'http://127.0.0.1:97',
        pathRewrite: {
            // 正则对?必须转义
            '^/index.php\\?explorer': '/explorer.html' 
        },
        changeOrigin: true,
    },
    
    // 编辑器模式
    '/index.php?editor/edit': {
        target: 'http://127.0.0.1:97',
        pathRewrite: {
            // 正则对?必须转义
            '^/index.php\\?editor': '/editor.html?editor' 
        },
        changeOrigin: true,
    },

    // WebIDE模式
    '/index.php?editor': {
        target: 'http://127.0.0.1:97',
        pathRewrite: {
            // 正则对?必须转义
            '^/index.php\\?editor': '/index.html?editor'
        },
        changeOrigin: true,
    },

    '/': {
        target: 'http://127.0.0.1:7474',
        changeOrigin: true,
        // pathRewrite: {
        //     '^/': '/' 
        // }
    }
};
